package com.kksoft.readcm.views;

import com.kksoft.readcm.pro.R;

import android.app.Activity;
import android.content.Context;
import android.os.Bundle;
import android.os.Parcelable;
import android.util.AttributeSet;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;

public class AnimatedProgressBar extends RelativeLayout
{
  private ProgressBar a;

  public AnimatedProgressBar(Context context, AttributeSet attributeset)
  {
	  super(context, attributeset);
      ((Activity)getContext()).getLayoutInflater().inflate(R.layout.animated_progress, this, true);
      a = (ProgressBar)findViewById(R.id.progressing);
  }

  public final int a()
  {
    return this.a.getProgress();
  }

  public final void a(int paramInt)
  {
    this.a.setProgress(paramInt);
  }

  protected void onRestoreInstanceState(Parcelable paramParcelable)
  {
    Parcelable localParcelable = ((Bundle)paramParcelable).getParcelable("superState");
    super.onRestoreInstanceState(localParcelable);
  }

  protected Parcelable onSaveInstanceState()
  {
    Bundle localBundle = new Bundle();
    localBundle.putParcelable("superState", super.onSaveInstanceState());
    return localBundle;
  }
}